package com.xiaopengwei.springboot.rabbitmq.rabbit.object;import com.xiaopengwei.springboot.rabbitmq.entity.User;import org.springframework.amqp.rabbit.annotation.RabbitHandler;import org.springframework.amqp.rabbit.annotation.RabbitListener;import org.springframework.stereotype.Component;/** * <p> * ObjectReceiver * </p> * * @author XiaoPengwei.com * @since 2019-04-20 */@Component@RabbitListener(queues = "object")public class ObjectReceiver {    @RabbitHandler    public void process(User user) {        System.out.println("Receiver object : " + user);    }}